using System;
using System.Collections.Generic;
using ns26;
using ns27;
using Triton.Game.Mono;

namespace Triton.Game.Mapping
{
	[Attribute38("MemUtils")]
	public class MemUtils : MonoClass
	{
		public MemUtils(IntPtr address, string className)
			: base(address, className)
		{
		}

		public MemUtils(IntPtr address)
			: this(address, "MemUtils")
		{
		}

		public static void FreePtr(IntPtr ptr)
		{
			MonoClass.smethod_18(TritonHs.MainAssemblyPath, "", "MemUtils", "FreePtr", ptr);
		}

		public static List<byte> PtrToBytes(IntPtr ptr, int size)
		{
			return MonoClass.smethod_15<Class250<byte>>(TritonHs.MainAssemblyPath, "", "MemUtils", "PtrToBytes", new object[2] { ptr, size })?.method_25();
		}

		public static IntPtr Utf8PtrFromString(string managedString)
		{
			return MonoClass.smethod_14<IntPtr>(TritonHs.MainAssemblyPath, "", "MemUtils", "Utf8PtrFromString", new object[1] { managedString });
		}

		public static string StringFromUtf8Ptr(IntPtr ptr)
		{
			return MonoClass.smethod_13(TritonHs.MainAssemblyPath, "", "MemUtils", "StringFromUtf8Ptr", new Class276.Enum20[1] { Class276.Enum20.ValueType }, ptr);
		}

		public static int StringPtrByteLen(IntPtr ptr)
		{
			return MonoClass.smethod_14<int>(TritonHs.MainAssemblyPath, "", "MemUtils", "StringPtrByteLen", new object[1] { ptr });
		}
	}
}
